<?php
/**
 * The router file of PMS.
 *
 * All request should be routed by this router.
 *
 * @copyright   Copyright 2015 广州欧凸欧科技有限公司(Guangzhou O2O Health Technology Co,LTD, www.o2omedical.com/www.o2ohealth.co.uk)
 * @author      CY Jiao <c.y.jiao@o2omedical.com>
 * @package     O2OPMS
 * @version     $Id: index.php
 * @link        https://brglxt.com
 */

// change the following paths if necessary
$yii=dirname(__FILE__).'/yii-1.1.16.42/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
define('BASE_DIR',dirname(__FILE__));
$GLOBALS['mongodb'] = include(dirname(__FILE__)."/protected/config/mongodb.php");
date_default_timezone_set('PRC'); 
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

include_once "./protected/functions.php";
include_once "./protected/classes.php";
require_once($yii);
Yii::createWebApplication($config)->run();
